package com.tywj.panda.customer.common.dialog

import android.os.Bundle
import android.text.method.ScrollingMovementMethod
import android.view.Gravity
import android.view.WindowManager
import com.tywj.panda.customer.common.R
import com.tywj.panda.customer.common.view.dialog.BottomDialog
import com.tywj.lib.core.common.extension.onClick
import kotlinx.android.synthetic.main.common_buy_details_tips.*

/**
 * 购买说明
 */
class BuyDialog : BottomDialog() {

    companion object {
        const val TAG = "BuyDialog"
    }

    override fun getGravity(): Int = Gravity.CENTER

    override fun getWidth(): Int = WindowManager.LayoutParams.WRAP_CONTENT

    override fun getLayoutID(): Int = R.layout.common_buy_details_tips

    override fun initView(savedInstanceState: Bundle?) {
        super.initView(savedInstanceState)
        tvDes.movementMethod = ScrollingMovementMethod.getInstance();
    }

    override fun initListener() {
        super.initListener()
        ivClose.onClick {

            dismiss()
        }
        tvCancel.onClick {

            dismiss()
        }
    }
}